Re: JDBC:Using Large Objects
От | Herouth Maoz |
---|---|
Тема | Re: JDBC:Using Large Objects |
Дата | |
Msg-id | l03130307b39562624224@[147.233.159.109] обсуждение исходный текст |
Ответ на | JDBC:Using Large Objects (Steffen Zimmert <szimmert@crcg.edu>) |
Список | pgsql-interfaces |
At 21:38 +0300 on 22/06/1999, Steffen Zimmert wrote: > I created the associated database table with the following statement: > create table images (imgname name, imgoid oid); > ... > // Create PreparedStatement > PreparedStatement ps = db.prepareStatement("Insert into database values > (?,?)"); > ps.setString(1,"TEST"); > ps.setBytes(2,objBytes); > ps.executeUpdate(); > ps.close(); Well, if it's defined as an oid, and you pass an array of bytes to it, it certainly won't work. An oid is a four-byte integer, not a byte array. Please look in the Postgres programmer documentation, in the JDBC part, under "Postgres Extensions to the JDBC API". There is a separate mechanism to access PostgreSQL's large object interface, as well as the geometric types etc. Herouth -- Herouth Maoz, Internet developer. Open University of Israel - Telem project http://telem.openu.ac.il/~herutma
В списке pgsql-interfaces по дате отправления: